<tagLib name="strends" />
<include file="Public:header" />
<div class="handle-btns">
	<strends:linkBtn text="{%RETURN_LIST}" href="{:U(MODULE_NAME.'/index')}" />
</div>
<style>
.fashion_element span { background-color:#8ABD0F; border-radius:3px; padding:3px 5px; color:white; cursor:pointer; margin-right:10px }
</style>
<form method='post' id="form" name="form" action="{:U(MODULE_NAME.'/update')}" enctype="multipart/form-data">
<table cellpadding="4" cellspacing="0" border="0" class="table-form">
	<tr>
		<th width="150">{%NAME}</th>
		<td><input type="text" class="textinput requireinput" name="name" value="{$vo['name']}" /></td>
	</tr>
	<tr>
		<th width="150">{%HOUSE_TYPE}</th>
		<td>
			<select name="house_type">
				<foreach name="home_list" item="home_list_item">
                    <if condition="$home_list_item.type eq 3">
                        <option value="{$home_list_item.tag_name}" <if condition="$vo['house_type'] eq $home_list_item['tag_name']">selected="selected"</if>>{$home_list_item.tag_name}</option>
                    </if>
				</foreach>
			</select>
   		</td>
	</tr>
	<tr>
		<th>{%THUMBNAIL}</th>
		<td>
			<input type="file" class="fileinput" name="thumbnail" size="30" />
			<if condition="$vo['thumbnail'] neq ''">
				<a href="__ROOT__/{$vo['thumbnail']}" target="_blank" >{%VIEW}</a>
			</if>
		</td>
	</tr>
	<tr>
		<th>{%CONTENT}</th>
		<td>
			<textarea name="content" class="textinput areainput" rows="3">{$vo['content']}</textarea>
		</td>
	</tr>
	<tr>
		<th>{%TAGS}</th>
		<td class='fashion_element'>
			<!--select name="house_type">
				<foreach name="home_list" item="home_list_item">
                    <if condition="$home_list_item.type eq 2">
                        <option value="{$home_list_item.tag_name}">{$home_list_item.tag_name}</option>
                    </if>
				</foreach>
			</select-->
 		<input type="text" class="textinput" name="tags" id="tags" value="{$vo['tags']}" size="80" /></br></br>
           <foreach name="home_list" item="home_list_item">
                <if condition="$home_list_item.type eq 2">
                    <span>{$home_list_item.tag_name}</span>
                </if>
            </foreach>
   		</td>
	</tr>
	<tr>
		<th>{%BRAND_TAG}</th>
		<td>
			<select name="brand_tag">
				<foreach name="home_list" item="home_list_item">
                    <if condition="$home_list_item.type eq 4">
                        <option value="{$home_list_item.tag_name}" <if condition="$vo['brand_tag'] eq $home_list_item['tag_name']">selected="selected"</if>>{$home_list_item.tag_name}</option>
                    </if>
				</foreach>
			</select>
   		</td>
	</tr>
	<tr>
		<th>{%MONTH}</th>
		<td>
			<select name="month">
               <php>
               for($i=1;$i<=12;$i++){
               			if($vo['month']==$i)
                        	echo ('<option value="'.$i.'" selected="selected">'.$i.'</option>');
                        else
                        	echo ('<option value="'.$i.'">'.$i.'</option>');
                }
                </php>
			</select>
   		</td>
	</tr>
   	<tr>
		<th>{%3DFLASH}</th>
		<td>
			<input type="file" class="fileinput" name="3dflash" size="30" />
			<if condition="$vo['3dflash'] neq ''">
				<a href="__ROOT__/{$vo['3dflash']}" target="_blank" >{%VIEW}</a>
			</if>
		</td>
	</tr>
	<tr class="act">
		<th>&nbsp;</th>
		<td>
			<input type="hidden" name="id" value="{$vo['id']}" />
			<input type="submit" class="submit_btn" value="{%SUBMIT}" />
			<input type="reset" class="reset_btn" value="{%RESET}" />
		</td>
	</tr>
</table>
</form>
<include file="Public:footer" />
<script type="text/javascript" src="__TMPL__Static/Js/jquery.js"></script>
<script type="text/javascript" src="__TMPL__Static/Js/base.js"></script>
